import Vue from "vue";
import VueRouter from "vue-router";
const Home = () => import("@/views/Home/index.vue");
const Networkpoint = () => import("@/views/Networkpoint/networkPointIndex.vue");
const Waybill = () => import("@/views/Waybill.vue");
const Freight = () => import("@/views/Freight/freightIndex.vue");
const Sendpiece = () => import("@/views/Sendpiece/sendIndex.vue");
Vue.use(VueRouter);
const routes = [
  {
    path: "/",
    redirect: "/Networkpoint",
  },
  {
    path: "/Home",
    name: "Home",
    component: Home,
    children: [
      {
        path: "/Networkpoint",
        name: "Networkpoint",
        component: Networkpoint,
      },
      {
        path: "/Waybill",
        name: "Waybill",
        component: Waybill,
      },
      {
        path: "/Freight",
        name: "Freight",
        component: Freight,
      },
      {
        path: "/Sendpiece/:name",
        name: "Sendpiece",
        component: Sendpiece,
      },
    ],
  },
];
const router = new VueRouter({
  mode: "history",
  base: process.env.BASE_URL,
  routes,
});
export default router;
